import { baseUrlApi, requestClient, type Result } from '#/api/request';

/** 获取档案列表 */
export const getPrintTemplate = (params?: object) => {
  return requestClient.get<Result>(baseUrlApi('/preg/admin/print_template'), {
    params,
  });
};

/** 添加 */
export const postPrintTemplate = (data?: object) => {
  return requestClient.put<Result>(
    baseUrlApi('/preg/admin/print_template'),
    data,
  );
};

/** 编辑 */
export const putPrintTemplate = (data?: any) => {
  return requestClient.put<Result>(
    baseUrlApi(`/preg/admin/print_template/${data.id}`),
    {
      data,
    },
  );
};
